]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/muondep/AliMuonAccEffSubmitter.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWG / muondep / AliMuonAccEffSubmitter.h
1 #ifndef ALIMUONACCEFFSUBMITTER_H
2 #define ALIMUONACCEFFSUBMITTER_H
3
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
11 #include "AliMuonGridSubmitter.h"
12
13 class AliMuonAccEffSubmitter : public AliMuonGridSubmitter
14 {
15 public:
16   AliMuonAccEffSubmitter(const char* generator="GenParamCustom",
17                          Bool_t localOnly=kFALSE,
18                          const char* generatorVersion="8125");
19
20   virtual Bool_t Generate(const char* jdlname) const;
21   virtual Bool_t Run(const char* mode);
22
23   virtual ~AliMuonAccEffSubmitter();
24
25   void MakeNofEventsPropToTriggerCount(const char* trigger="CMUL7-B-NOPF-MUON", Float_t ratio=1.0);
26   
27   void MakeNofEventsFixed(Int_t nevents);
28   
29   void UseOCDBSnapshots(Bool_t flag);
30   
31   void UseExternalConfig(const char* externalConfigFullFilePath);
32   
33   void UseAODMerging(Bool_t flag);
34   
35   Bool_t Merge(Int_t stage, Bool_t dryRun=kTRUE);
36
37   Int_t Submit(Bool_t dryRun=kTRUE);
38   
39   Int_t LocalTest();
40   
41   TString RunJDLName() const { return "run.jdl"; }
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
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   
55   Bool_t MakeOCDBSnapshots();
56   
57   void SetOCDBPath(const char* ocdbPath);
58
59   void SetOCDBSnapshotDir(const char* dir);
60
61   Bool_t SetGenerator(const char* generator);
62
63   Int_t MaxEventsPerChunk() const { return fMaxEventsPerChunk; }
64   void SetMaxEventsPerChunk(Int_t n) { fMaxEventsPerChunk = n; }
65
66   TString OCDBPath() const { return GetMapValue("OCDBPath"); }
67   
68   TString SnapshotDir() const { return GetMapValue("OCDBsnapshot"); }
69
70   Int_t SplitRunList(const char* inputList, int maxJobs=1500);
71   
72 private:
73   
74   Bool_t GenerateRunJDL(const char* name) const;
75   
76   Bool_t GenerateMergeJDL(const char* name) const;
77   
78   TString ReferenceTrigger() const { return GetMapValue("ReferenceTrigger"); }
79   
80   void UpdateLocalFileList(Bool_t clearSnapshots=kFALSE);
81
82 private:
83   AliMuonAccEffSubmitter(const AliMuonAccEffSubmitter& rhs);
84   AliMuonAccEffSubmitter& operator=(const AliMuonAccEffSubmitter& rhs);
85   
86 private:
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
90   TString fOCDBPath; // OCDB path
91   Int_t fSplitMaxInputFileNumber; // used for merging jdl
92   Int_t fCompactMode; // controls which outputs are kept (0=everything, 1=only aods)
93   TString fExternalConfig; // path to an (optional) external config file
94   Bool_t fUseOCDBSnapshots; // whether to use OCDB snapshots or not
95   TString fSnapshotDir; // directory for OCDB snapshots
96   Bool_t fUseAODMerging; // whether or not to perform (aod) merging
97   
98   ClassDef(AliMuonAccEffSubmitter,2) // Helper class to submit AccxEff single particle simulations
99 };
100
101 #endif
102