]>
Commit | Line | Data |
---|---|---|
a58729a5 | 1 | #ifndef ALIMUONACCEFFSUBMITTER_H |
2 | #define ALIMUONACCEFFSUBMITTER_H | |
3 | ||
1afce1ce | 4 | // |
5 | // AliMuonAccEffSubmitter : a class to help submit Acc x Eff simulations | |
6 | // anchored to real runs for J/psi, upsilon, single muons, etc... | |
7 | // | |
8 | // author: Laurent Aphecetche (Subatech) | |
9 | // | |
10 | ||
81190958 | 11 | #include "AliMuonGridSubmitter.h" |
a58729a5 | 12 | |
81190958 | 13 | class AliMuonAccEffSubmitter : public AliMuonGridSubmitter |
a58729a5 | 14 | { |
15 | public: | |
30138a88 | 16 | AliMuonAccEffSubmitter(const char* generator="GenParamCustom", |
17 | Bool_t localOnly=kFALSE, | |
3e7b6e7b | 18 | const char* generatorVersion="8125"); |
a58729a5 | 19 | |
81190958 | 20 | virtual Bool_t Generate(const char* jdlname) const; |
21 | virtual Bool_t Run(const char* mode); | |
a58729a5 | 22 | |
81190958 | 23 | virtual ~AliMuonAccEffSubmitter(); |
a58729a5 | 24 | |
81190958 | 25 | void MakeNofEventsPropToTriggerCount(const char* trigger="CMUL7-B-NOPF-MUON", Float_t ratio=1.0); |
1afce1ce | 26 | |
81190958 | 27 | void MakeNofEventsFixed(Int_t nevents); |
a58729a5 | 28 | |
81190958 | 29 | void UseOCDBSnapshots(Bool_t flag); |
a58729a5 | 30 | |
81190958 | 31 | void UseExternalConfig(const char* externalConfigFullFilePath); |
a58729a5 | 32 | |
81190958 | 33 | void UseAODMerging(Bool_t flag); |
a58729a5 | 34 | |
35 | Bool_t Merge(Int_t stage, Bool_t dryRun=kTRUE); | |
36 | ||
37 | Int_t Submit(Bool_t dryRun=kTRUE); | |
38 | ||
eb5de7ee | 39 | Int_t LocalTest(); |
40 | ||
b8ebdef6 | 41 | TString RunJDLName() const { return "JDL"; } |
a58729a5 | 42 | |
43 | TString MergeJDLName(Bool_t final) const { return (final ? "AOD_merge_final.jdl" : "AOD_merge.jdl"); } | |
44 | ||
45 | virtual void Print(Option_t* opt="") const; | |
46 | ||
a58729a5 | 47 | void SetSplitMaxInputFileNumber(Int_t n) { fSplitMaxInputFileNumber = n; } |
48 | ||
49 | Int_t GetSplitMaxInputFileNumber() const { return fSplitMaxInputFileNumber; } | |
50 | ||
51 | Int_t CompactMode() const { return fCompactMode; } | |
52 | ||
53 | void SetCompactMode(Int_t mode) { fCompactMode=mode; } | |
54 | ||
a58729a5 | 55 | Bool_t MakeOCDBSnapshots(); |
56 | ||
81190958 | 57 | void SetOCDBPath(const char* ocdbPath); |
58 | ||
a58729a5 | 59 | void SetOCDBSnapshotDir(const char* dir); |
60 | ||
1afce1ce | 61 | Bool_t SetGenerator(const char* generator); |
a58729a5 | 62 | |
81190958 | 63 | Int_t MaxEventsPerChunk() const { return fMaxEventsPerChunk; } |
b8ebdef6 | 64 | void SetMaxEventsPerChunk(Int_t n) { fMaxEventsPerChunk = n; SetVar("VAR_EVENTS_PER_JOB", Form("%i",n)); } |
a58729a5 | 65 | |
81190958 | 66 | TString OCDBPath() const { return GetMapValue("OCDBPath"); } |
a58729a5 | 67 | |
81190958 | 68 | TString SnapshotDir() const { return GetMapValue("OCDBsnapshot"); } |
a58729a5 | 69 | |
3e7b6e7b | 70 | Int_t SplitRunList(const char* inputList, int maxJobs=1500); |
71 | ||
81190958 | 72 | private: |
a58729a5 | 73 | |
81190958 | 74 | Bool_t GenerateRunJDL(const char* name) const; |
a58729a5 | 75 | |
81190958 | 76 | Bool_t GenerateMergeJDL(const char* name) const; |
a58729a5 | 77 | |
81190958 | 78 | TString ReferenceTrigger() const { return GetMapValue("ReferenceTrigger"); } |
1afce1ce | 79 | |
81190958 | 80 | void UpdateLocalFileList(Bool_t clearSnapshots=kFALSE); |
81 | ||
1afce1ce | 82 | private: |
83 | AliMuonAccEffSubmitter(const AliMuonAccEffSubmitter& rhs); | |
84 | AliMuonAccEffSubmitter& operator=(const AliMuonAccEffSubmitter& rhs); | |
a58729a5 | 85 | |
86 | private: | |
1afce1ce | 87 | Float_t fRatio; // ratio simulated events vs real events |
88 | Int_t fFixedNofEvents; // fixed number of events to be used per run | |
89 | Int_t fMaxEventsPerChunk; // max events to generate per subjob | |
1afce1ce | 90 | TString fOCDBPath; // OCDB path |
1afce1ce | 91 | Int_t fSplitMaxInputFileNumber; // used for merging jdl |
92 | Int_t fCompactMode; // controls which outputs are kept (0=everything, 1=only aods) | |
1afce1ce | 93 | TString fExternalConfig; // path to an (optional) external config file |
94 | Bool_t fUseOCDBSnapshots; // whether to use OCDB snapshots or not | |
1afce1ce | 95 | TString fSnapshotDir; // directory for OCDB snapshots |
a3c2a88b | 96 | Bool_t fUseAODMerging; // whether or not to perform (aod) merging |
a58729a5 | 97 | |
a3c2a88b | 98 | ClassDef(AliMuonAccEffSubmitter,2) // Helper class to submit AccxEff single particle simulations |
a58729a5 | 99 | }; |
100 | ||
101 | #endif | |
102 |