CbmRoot
Loading...
Searching...
No Matches
CbmMcbmCheckTimingTask.cxx
Go to the documentation of this file.
1/* Copyright (C) 2020-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
6
8
10#include <Logger.h>
11
13#include "TH1.h"
14#include "TH2.h"
15#include "THttpServer.h"
16#include <TDirectory.h>
17#include <TFile.h>
18
20
21// ---- Default constructor -------------------------------------------
22CbmMcbmCheckTimingTask::CbmMcbmCheckTimingTask() : FairTask("CbmMcbmCheckTimingTask")
23{
26}
27
28// ---- Destructor ----------------------------------------------------
30
31// ---- Initialisation ----------------------------------------------
36
37// ---- Init ----------------------------------------------------------
39{
41 if (kTRUE == fpAlgo->Init()) return kSUCCESS;
42 else
43 return kFATAL;
44}
45
46// ---- ReInit -------------------------------------------------------
47InitStatus CbmMcbmCheckTimingTask::ReInit() { return kSUCCESS; }
48
49// ---- Exec ----------------------------------------------------------
50void CbmMcbmCheckTimingTask::Exec(Option_t* /*option*/)
51{
52 LOG(debug2) << "CbmMcbmCheckTimingTask::Exec => Starting sequence";
55
56 LOG(debug2) << "CbmMcbmCheckTimingTask::Exec => Done";
57}
58
59
60// ---- Finish --------------------------------------------------------
68//----------------------------------------------------------------------
70{
72 /*
74 std::vector< std::pair< TNamed *, std::string > > vHistos = fpAlgo->GetHistoVector();
75
77 TFile* oldFile = gFile;
78 TDirectory* oldDir = gDirectory;
79
81 TFile* histoFile = nullptr;
82
84 histoFile = new TFile( fsOutFileName , "RECREATE");
85 histoFile->cd();
86
88 for( UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto )
89 {
91 TString sFolder = vHistos[ uHisto ].second.data();
92 if( nullptr == gDirectory->Get( sFolder ) )
93 gDirectory->mkdir( sFolder );
94 gDirectory->cd( sFolder );
95
97 vHistos[ uHisto ].first->Write();
98
99 histoFile->cd();
100 } // for( UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto )
101
103 gFile = oldFile;
104 gDirectory = oldDir;
105*/
106}
107//----------------------------------------------------------------------
109{
110 fsOutFileName = sNameIn;
112}
113//----------------------------------------------------------------------
114void CbmMcbmCheckTimingTask::SetReferenceDetector(ECbmModuleId refDetIn, std::string sNameIn, Double_t dTimeRangeBegIn,
115 Double_t dTimeRangeEndIn, UInt_t uRangeNbBinsIn,
116 UInt_t uChargeCutMinIn, UInt_t uChargeCutMaxIn)
117{
118 fpAlgo->SetReferenceDetector(refDetIn, sNameIn, dTimeRangeBegIn, dTimeRangeEndIn, uRangeNbBinsIn, uChargeCutMinIn,
119 uChargeCutMaxIn);
120}
121void CbmMcbmCheckTimingTask::AddCheckDetector(ECbmModuleId detIn, std::string sNameIn, Double_t dTimeRangeBegIn,
122 Double_t dTimeRangeEndIn, UInt_t uRangeNbBinsIn, UInt_t uChargeCutMinIn,
123 UInt_t uChargeCutMaxIn)
124{
125 fpAlgo->AddCheckDetector(detIn, sNameIn, dTimeRangeBegIn, dTimeRangeEndIn, uRangeNbBinsIn, uChargeCutMinIn,
126 uChargeCutMaxIn);
127}
128
130
131void CbmMcbmCheckTimingTask::SetDetectorDifferential(ECbmModuleId detIn, std::vector<std::string> vn)
132{
134}
135
136//----------------------------------------------------------------------
ClassImp(CbmConverterManager)
ECbmModuleId
Definition CbmDefs.h:39
void AddCheckDetector(ECbmModuleId detIn, std::string sNameIn, Double_t dTimeRangeBegIn=-1000.0, Double_t dTimeRangeEndIn=1000.0, UInt_t uRangeNbBinsIn=320, UInt_t uChargeCutMinIn=0, UInt_t uChargeCutMaxIn=0)
void SetDetectorDifferential(ECbmModuleId detIn, std::vector< std::string > vName)
void SetOutFilename(TString sNameIn)
void SetReferenceDetector(ECbmModuleId refDetIn, std::string sNameIn, Double_t dTimeRangeBegIn=-1000.0, Double_t dTimeRangeEndIn=1000.0, UInt_t uRangeNbBinsIn=320, UInt_t uChargeCutMinIn=0, UInt_t uChargeCutMaxIn=0)
void RemoveCheckDetector(ECbmModuleId detIn)
void SetOutFilename(TString sNameIn)
void RemoveCheckDetector(ECbmModuleId detIn)
void AddCheckDetector(ECbmModuleId detIn, std::string sNameIn, Double_t dTimeRangeBegIn=-1000.0, Double_t dTimeRangeEndIn=1000.0, UInt_t uRangeNbBinsIn=320, UInt_t uChargeCutMinIn=0, UInt_t uChargeCutMaxIn=0)
void SetDetectorDifferential(ECbmModuleId detIn, std::vector< std::string > vName)
virtual void Exec(Option_t *)
void SetReferenceDetector(ECbmModuleId refDetIn, std::string sNameIn, Double_t dTimeRangeBegIn=-1000.0, Double_t dTimeRangeEndIn=1000.0, UInt_t uRangeNbBinsIn=320, UInt_t uChargeCutMinIn=0, UInt_t uChargeCutMaxIn=0)
CbmMcbmCheckTimingAlgo * fpAlgo