21 |
|
namespace mithep |
22 |
|
{ |
23 |
|
class RunLumiSelectionMod : public BaseMod { |
24 |
+ |
typedef std::map<UInt_t,std::vector<std::pair<UInt_t,UInt_t> > > MapType; |
25 |
+ |
typedef std::pair<UInt_t,UInt_t> RunLumiPairType; |
26 |
+ |
|
27 |
+ |
|
28 |
|
public: |
29 |
|
RunLumiSelectionMod(const char *name="RunLumiSelectionMod", const char *title="Run selection module"); |
30 |
|
~RunLumiSelectionMod(); |
31 |
|
|
32 |
< |
void AddRun(UInt_t i) { fAcceptedRuns.push_back(UIntPair(i,i)); } |
29 |
< |
void AddRuns(UInt_t l, UInt_t u) { fAcceptedRuns.push_back(UIntPair(l,u)); } |
30 |
< |
void ExcludeRun(UInt_t i) { fExcludedRuns.push_back(UIntPair(i,i)); } |
31 |
< |
void ExcludeRuns(UInt_t l, UInt_t u) { fExcludedRuns.push_back(UIntPair(l,u)); } |
32 |
> |
void AddJSONFile(const std::string &filepath); |
33 |
|
Int_t GetNEvents() const { return fNEvents; } |
34 |
|
Int_t GetNAccepted() const { return fNAcceped; } |
35 |
|
Int_t GetNFailed() const { return fNFailed; } |
36 |
|
void SetAbortIfNotAccepted(Bool_t b) { fAbort = b; } |
37 |
< |
void SetDefaultAccept(Bool_t b) { fDefaultAccept = b; } |
37 |
> |
void SetAcceptMC(Bool_t b) { fAcceptMC = b; } |
38 |
|
|
39 |
|
protected: |
40 |
|
void BeginRun(); |
45 |
|
void SlaveTerminate(); |
46 |
|
|
47 |
|
Bool_t fAbort; //=true then abort (sub-)modules if not accepted |
48 |
< |
Bool_t fDefaultAccept; //=true then accept runs not explicitly included or excluded |
48 |
> |
Bool_t fAcceptMC; //=true then accept Monte Carlo unconditionally |
49 |
|
Int_t fNEvents; //!number of processed events |
50 |
|
Int_t fNAcceped; //!number of accepted events |
51 |
|
Int_t fNFailed; //!number of failed events |
52 |
< |
Bool_t fAcceptCurrentRun; //!cached decision for current run |
53 |
< |
UIntBounds fAcceptedRuns; //list of run ranges to accept |
54 |
< |
UIntBounds fExcludedRuns; //list of run ranges to exclude |
52 |
> |
RunLumiPairType fCurrentRunLumi; //!cached current run-lumi pair |
53 |
> |
Bool_t fAcceptCurrentRunLumi; //!cached decision for current run-lumi pair |
54 |
> |
MapType fAcceptedRunsLumis; //mapped run-lumi ranges to accept |
55 |
|
|
56 |
|
ClassDef(RunLumiSelectionMod, 1) // L1 TAM module |
57 |
|
}; |