BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnDigiMergeTask.h
Go to the documentation of this file.
1#include <BmnCSCStationSet.h>
2#include <BmnDigiContainer.h>
3#include <BmnGemStripStationSet.h>
4#include <BmnSiliconStationSet.h>
5#include <TChain.h>
6#include <TClonesArray.h>
7#include <TFile.h>
8#include <TMath.h>
9#include <TNamed.h>
10#include <TString.h>
11#include <TSystem.h>
12#include <TTree.h>
13#include <iostream>
14#include <map>
15#include <vector>
16
17#ifndef BMNDIGIMERGETASK_H
18#define BMNDIGIMERGETASK_H 1
19
20using namespace std;
21using namespace TMath;
22
24{
25 public:
26 /** Default constructor **/
28
29 // RUN6 (split to detectors)
31
32 // RUN7 (split to detectors)
34
35 // RUN7 (split to detectors), to be used in case of SRC only
36 BmnDigiMergeTask(vector<TString>);
37
38 // All-digits-together
39 BmnDigiMergeTask(vector<TString>, TString);
40
41 /** Destructor **/
43 {
44 if (fOutTree && fOutFile) {
45 fOutTree->Write();
46 fOutFile->Close();
47 }
48
49 if (fOutTrees && fOutFiles)
50 for (Int_t iDet = 0; iDet < nDets; iDet++) {
51 fOutFiles[iDet]->cd();
52 fOutTrees[iDet]->Write();
53 fOutFiles[iDet]->Close();
54 }
55 }
56
57 // Setters
58
59 void SetNevsInSample(UInt_t nEvs) { fNevsInSample = nEvs; }
60
61 void SetNevsToBeProcessed(UInt_t nEvs) { fNevsToBeProcessed = nEvs; }
62
63 void ProcessEvents();
64
66 {
67 if (!src)
69 else
71 }
72
73 private:
77
80
84
86
126
166
167 // Three versions of BmnEventHeader to be read from files (Here fuck my life twice!)
173
174 // TClonesArray* fHeaderOut;
176
178
181
184
189
193
194 map<Int_t, Int_t> fGemStats;
195 map<Int_t, Int_t> fSilStats;
196
198 UInt_t maxEvId;
199
200 inline Int_t GemStatPermutation(Int_t stat) { return fGemStats.find(stat)->second; }
201
202 inline Int_t SiliconStatPermutation(Int_t stat) { return fSilStats.find(stat)->second; }
203
206 void CreateOutputFiles();
207
210 void SplitToDetectorsSrc();
211
212 void CreateGeometries();
213 void Run7(Int_t*, Int_t*, Int_t*, Int_t*);
214
215 template<class T>
216 void FillDetDigi(TClonesArray* inDigiArr, TClonesArray* outDigiArr)
217 {
218 for (UInt_t iDigi = 0; iDigi < inDigiArr->GetEntriesFast(); iDigi++)
219 new ((*outDigiArr)[outDigiArr->GetEntriesFast()]) T(*(T*)inDigiArr->UncheckedAt(iDigi));
220 };
221
223};
224
225#endif
bool Bool_t
int Int_t
long Long_t
constexpr Bool_t kFALSE
#define ClassDef(name, id)
TClonesArray * fY1L
TClonesArray * fY1RTQDC
TClonesArray * fBC4TQDCDigits
TClonesArray * fGemDigits
TClonesArray * fY2R
BmnCSCStationSet * fDetectorCSC
TClonesArray * fX2RTQDC
TClonesArray * fZdcDigits
map< Int_t, Int_t > fGemStats
TClonesArray * fBC2
TClonesArray * fY2RTQDC
TClonesArray * fVetoTQDCDigits
TClonesArray * fY1RDigits
TClonesArray * fBC3Digits
Int_t GemStatPermutation(Int_t stat)
BmnEventHeader ** fHeaders
TClonesArray * fZdc
TClonesArray * fY2RTQDCDigits
TClonesArray * fX1RDigits
TClonesArray * fY1LTQDCDigits
TClonesArray * fX1RTQDC
TClonesArray * fBC2Digits
BmnEventHeader * fHeader2Obj
TClonesArray * fTof700Digits
TClonesArray * fBC1Digits
TClonesArray * fHeader1
TClonesArray * fBC3TQDC
TClonesArray * fTof400Digits
TClonesArray * fY1LDigits
void SplitToDetectors(Bool_t src=kFALSE)
TClonesArray * fBC3
void FillDetDigi(TClonesArray *inDigiArr, TClonesArray *outDigiArr)
TClonesArray * fVeto
TClonesArray * fX1RTQDCDigits
BmnDigiContainer * fCont
BmnEventHeader * fHeaderOut
TClonesArray * fBdDigits
TClonesArray * fBC1TQDCDigits
TClonesArray * fX2RDigits
TClonesArray * fHeader2
TClonesArray * fTof400
TClonesArray * fMwpc
TClonesArray * fY1RTQDCDigits
TClonesArray * fHeader3
BmnSiliconStationSet * fDetectorSI
TClonesArray * fBC3TQDCDigits
TClonesArray * fBC4
TClonesArray * fCsc
TClonesArray * fSi
TClonesArray * fFdDigits
TClonesArray * fBC2TQDCDigits
TClonesArray * fY2L
TClonesArray * fBC4Digits
BmnGemStripStationSet * fDetectorGEM
TClonesArray * fEcalDigits
TClonesArray * fSilDigits
TClonesArray * fCscDigits
TClonesArray * fT0
TClonesArray * fVetoTQDC
TClonesArray * fBC1
TClonesArray * fBd
TClonesArray * fMwpcDigits
void Run7(Int_t *, Int_t *, Int_t *, Int_t *)
TClonesArray * fX2LTQDC
void CreateOutputFile(TString)
TClonesArray * fX2R
TClonesArray * fY2LDigits
void SetNevsInSample(UInt_t nEvs)
map< Int_t, Int_t > fSilStats
TClonesArray * fSiDigits
void SetNevsToBeProcessed(UInt_t nEvs)
TClonesArray * fFd
BmnEventHeader * fHeader3Obj
TClonesArray * fX2LTQDCDigits
TClonesArray ** fOutArrs
TClonesArray * fY1R
TClonesArray * fT0Digits
BmnDigiMergeTask()
Default constructor.
TClonesArray * fTof700
TClonesArray * fY2LTQDCDigits
TClonesArray * fY2RDigits
TClonesArray * fVetoDigits
TClonesArray * fY2LTQDC
TClonesArray * fDch
TClonesArray * fX2L
TClonesArray * fX1L
TClonesArray * fEcal
TClonesArray * fBC2TQDC
TClonesArray * fSil
TClonesArray * fX1R
TClonesArray * fBC4TQDC
TClonesArray * fX1LTQDC
TClonesArray ** fInArrs
TClonesArray * fX2RTQDCDigits
TClonesArray * fX1LTQDCDigits
TClonesArray * fDchDigits
TClonesArray * fX1LDigits
TClonesArray * fX2LDigits
TClonesArray * fBC1TQDC
TClonesArray * fY1LTQDC
TClonesArray * fGem
Int_t SiliconStatPermutation(Int_t stat)
virtual ~BmnDigiMergeTask()
Destructor.
Int_t GetEntriesFast() const
TObject * UncheckedAt(Int_t i) const
friend friend class TClonesArray
Definition json.hpp:4446