1 |
#ifndef runglue_h |
2 |
#define runglue_h |
3 |
// |
4 |
#include <sstream> |
5 |
#include <iostream> |
6 |
#include <TFile.h> |
7 |
#include <TTree.h> |
8 |
#include <TTimeStamp.h> |
9 |
#include <TTreeCloner.h> |
10 |
#include <TSQLServer.h> |
11 |
#include <TSQLRow.h> |
12 |
#include <TSQLResult.h> |
13 |
#include <TList.h> |
14 |
#include <TString.h> |
15 |
#include <TObject.h> |
16 |
#include <TSQLServer.h> |
17 |
#include <TSQLRow.h> |
18 |
#include <TSQLResult.h> |
19 |
#include <TString.h> |
20 |
#include <TTimeStamp.h> |
21 |
#include <TSQLServer.h> |
22 |
#include <TRFIOFile.h> |
23 |
#include <TSystem.h> |
24 |
#include <TChain.h> |
25 |
#include <TH1.h> |
26 |
#include <TTree.h> |
27 |
#include <TKey.h> |
28 |
#include <Riostream.h> |
29 |
#include <TObjString.h> |
30 |
#include <TClass.h> |
31 |
#include <PamLevel2.h> |
32 |
// |
33 |
/** |
34 |
* \brief Class to group runs day by day |
35 |
*/ |
36 |
class RunGlue : public TObject { |
37 |
private: |
38 |
TSQLServer *dbc; |
39 |
PamLevel2 *li; |
40 |
UInt_t run; |
41 |
TString dir; |
42 |
TString outdir; |
43 |
TString fFilename; |
44 |
Bool_t fEnd; |
45 |
Bool_t RUN; |
46 |
TList *fDoneList; |
47 |
TList *fList; |
48 |
TList *lList; |
49 |
// TFile *Target; |
50 |
TRFIOFile *Target; |
51 |
TFile *Source; |
52 |
TString fDList; |
53 |
Bool_t fastMethod; |
54 |
Bool_t fDBG; |
55 |
Bool_t fOpen; |
56 |
Bool_t castor; |
57 |
Bool_t runmode; |
58 |
Bool_t createlist; |
59 |
Bool_t merged; |
60 |
UInt_t fNlist; |
61 |
UInt_t fNlistdone; |
62 |
UInt_t nrun; |
63 |
UInt_t YY; |
64 |
UInt_t MM; |
65 |
UInt_t DD; |
66 |
|
67 |
public: |
68 |
// |
69 |
RunGlue(); |
70 |
// |
71 |
RunGlue(TSQLServer *dbc,UInt_t run, TString dir, TString wrkdir, Bool_t castor); |
72 |
// |
73 |
// methods |
74 |
// |
75 |
void Clear(); |
76 |
void Clean(); |
77 |
TList *GetRunList(); |
78 |
Long64_t Mergy(TChain *, TFile *, Int_t, Option_t *); |
79 |
//Long64_t Mergy(TChain *, TRFIOFile *, Int_t, Option_t *); |
80 |
void MergeRootfile(TList *); |
81 |
Bool_t OpenFile(); |
82 |
// Bool_t OpenFile(Bool_t castor); |
83 |
void SetDebug(Bool_t); |
84 |
void SetDList(TString); |
85 |
void DeleteRunFiles(TList *); |
86 |
void UpdateDB(TList *); |
87 |
// |
88 |
// inline methods |
89 |
// |
90 |
Bool_t End(){return(fEnd);}; |
91 |
Bool_t FileIsOpen(){return(fOpen);}; |
92 |
Bool_t DebugMode(){return(fDBG);}; |
93 |
TString GetFilename(){return(fFilename);}; |
94 |
// |
95 |
// |
96 |
// |
97 |
// |
98 |
ClassDef(RunGlue,1); |
99 |
// |
100 |
}; |
101 |
|
102 |
#endif |