]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSTreeMakerComponent.h
Do not set default CDB storage, if not defined, but return Fatal.
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSTreeMakerComponent.h
1
2  /**************************************************************************
3  * This file is property of and copyright by the ALICE HLT Project        * 
4  * All rights reserved.                                                   *
5  *                                                                        *
6  * Primary Authors: Oystein Djuvsland                                     *
7  *                                                                        *
8  * Permission to use, copy, modify and distribute this software and its   *
9  * documentation strictly for non-commercial purposes is hereby granted   *
10  * without fee, provided that the above copyright notice appears in all   *
11  * copies and that both the copyright notice and this permission notice   *
12  * appear in the supporting documentation. The authors make no claims     *
13  * about the suitability of this software for any purpose. It is          * 
14  * provided "as is" without express or implied warranty.                  *
15  **************************************************************************/
16
17
18
19 #ifndef ALIHLTPHOSTREEMAKERCOMPONENT_H
20 #define ALIHLTPHOSTREEMAKERCOMPONENT_H
21
22 /**
23  * Tree maker component for PHOS HLT
24  *
25  * @file   AliHLTPHOSTreeMakerComponent.h
26  * @author Oystein Djuvsland
27  * @date   
28  * @brief  A tree maker component for PHOS HLT
29 */
30
31 // see below for class documentation
32 // or
33 // refer to README to build package
34 // or
35 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
36 #include "AliHLTPHOSProcessor.h"
37
38 class AliHLTPHOSTreeMaker;
39 class TTree;
40
41
42 /**
43  * @class AliHLTPHOSTreeMakerComponent
44  *
45  * Class for making trees of digits in PHOS HLT
46  * Takes as input structs of type AliHLTPHOSDigitContainerStruct, and makes a
47  * tree of TClonesArrays of objects of type AliHLTPHOSDigit 
48  *
49  * The component has the following component arguments:
50  * -path                   File name base
51  * -writeinterval          How often to write to disk, in events
52  *
53  * @ingroup alihlt_phos
54  */
55 class AliHLTPHOSTreeMakerComponent : public AliHLTPHOSProcessor
56 {
57  public:
58
59   /** Constructor */
60   AliHLTPHOSTreeMakerComponent();
61
62   /** Destructor */
63   virtual ~AliHLTPHOSTreeMakerComponent();
64     
65   /** interface function, see @ref AliHLTComponent for description */
66   const char* GetComponentID();
67   
68   /** interface function, see @ref AliHLTComponent for description */
69   void  GetInputDataTypes(std::vector<AliHLTComponentDataType>& list);
70   
71   /** interface function, see @ref AliHLTComponent for description */
72   AliHLTComponentDataType GetOutputDataType();
73   
74   /** interface function, see @ref AliHLTComponent for description */
75   void GetOutputDataSize(unsigned long& constBase, double& inputmultiplier);
76
77 /*
78   int DoEvent(const AliHLTComponentEventData&,
79               AliHLTComponentTriggerData&);
80   */
81
82   /** interface function, see @ref AliHLTComponent for description */
83   int DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
84               AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t&size,
85        std::vector<AliHLTComponentBlockData>& outputBlocks);
86
87   /** interface function, see @ref AliHLTComponent for description */
88   AliHLTComponent* Spawn();
89
90   /** Write the tree */
91   void Write(); 
92
93   /** Reset the trees */
94   void ResetTrees();
95    
96
97  protected:
98
99   /** interface function, see @ref AliHLTComponent for description */
100   int DoInit(int argc, const char** argv);
101
102   using AliHLTPHOSProcessor::DoEvent;
103
104   /** interface function, see @ref AliHLTComponent for description */
105   virtual int Deinit(); ////////// PTH WARNING you should Define a class AliHLTPHOSModuleProcessor
106   
107  private:  
108
109   /** Pointer to a AliHLTPHOSTreeMaker object */
110   AliHLTPHOSTreeMaker *fTreeMakerPtr;                           //! transient
111
112   /** Pointer to the tree */
113   TTree *fDigitTreePtr;                                         //! transient
114
115   /** Event count */
116   UInt_t fEvtCount;                                             //COMMENT
117
118   /** Write interval */
119   UInt_t fWriteInterval;                                        //COMMENT
120
121   /** Run number */
122   //UInt_t fRunNb;                                                //COMMENT
123
124   /** Path to the directory where to write the tree */
125   char *fDirectory;                                             //! transient
126
127   /** Framework variable */
128   static const AliHLTComponentDataType fgkInputDataTypes[];     //COMMENT
129   
130 };
131 #endif
132