CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaNArrayD.h

Go to the documentation of this file.
00001 #ifndef ROOT_TEcnaNArrayD
00002 #define ROOT_TEcnaNArrayD
00003 
00004 #include "TObject.h"
00005 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaObject.h"
00006 
00021 
00022 class TEcnaNArrayD : public TObject {
00023 
00024 protected:
00025 
00026   Int_t     fNd;  //dimension of the array
00027   Int_t     fN1;  //number of elements in the 1st dimension
00028   Int_t     fN2;  //number of elements in the 2nd dimension
00029   Int_t     fN3;  //number of elements in the 3rf dimension
00030   Int_t     fN4;  //number of elements in the 4th dimension
00031   Int_t     fN5;  //number of elements in the 5th dimension
00032   Int_t     fN6;  //number of elements in the 6th dimension
00033   Int_t     fNL;  //length of the array = fN1*fN2*fN3*fN4*fN5*fN6 + 1
00034   Double_t *fA;   //[fNL] Array of Double_t of dimension fNd
00035 
00036   void         Init();
00037   inline Int_t OneDim(Int_t) const;
00038   inline Int_t OneDim(Int_t,Int_t) const;
00039   inline Int_t OneDim(Int_t,Int_t,Int_t) const;
00040   inline Int_t OneDim(Int_t,Int_t,Int_t,Int_t) const;
00041   inline Int_t OneDim(Int_t,Int_t,Int_t,Int_t,Int_t) const;
00042   inline Int_t OneDim(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t) const;
00043 
00044 public:
00045 
00046   TEcnaNArrayD();
00047   TEcnaNArrayD(const TEcnaNArrayD&);
00048 
00049   TEcnaNArrayD(TEcnaObject*, Int_t);
00050   TEcnaNArrayD(TEcnaObject*, Int_t,Int_t);
00051   TEcnaNArrayD(TEcnaObject*, Int_t,Int_t,Int_t);
00052   TEcnaNArrayD(TEcnaObject*, Int_t,Int_t,Int_t,Int_t);
00053   TEcnaNArrayD(TEcnaObject*, Int_t,Int_t,Int_t,Int_t,Int_t);
00054   TEcnaNArrayD(TEcnaObject*, Int_t,Int_t,Int_t,Int_t,Int_t,Int_t);
00055   virtual ~TEcnaNArrayD();
00056   void     Clean();
00057   Double_t GetOverFlow() const { return fA[fNL-1]; }
00058   void     ReSet(Int_t);
00059   void     ReSet(Int_t,Int_t);
00060   void     ReSet(Int_t,Int_t,Int_t);
00061   void     ReSet(Int_t,Int_t,Int_t,Int_t);
00062   void     ReSet(Int_t,Int_t,Int_t,Int_t,Int_t);
00063   void     ReSet(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t);
00064   const Double_t &operator()(Int_t i1) const;
00065   const Double_t &operator()(Int_t i1,Int_t i2) const;
00066   const Double_t &operator()(Int_t i1,Int_t i2,Int_t i3) const;
00067   const Double_t &operator()(Int_t i1,Int_t i2,Int_t i3,Int_t i4) const;
00068   const Double_t &operator()(Int_t i1,Int_t i2,Int_t i3,Int_t i4,Int_t i5) const;
00069   const Double_t &operator()(Int_t i1,Int_t i2,Int_t i3,Int_t i4,Int_t i5,Int_t i6) const;
00070   Double_t &operator()(Int_t i1);
00071   Double_t &operator()(Int_t i1,Int_t i2);
00072   Double_t &operator()(Int_t i1,Int_t i2,Int_t i3);
00073   Double_t &operator()(Int_t i1,Int_t i2,Int_t i3,Int_t i4);
00074   Double_t &operator()(Int_t i1,Int_t i2,Int_t i3,Int_t i4,Int_t i5);
00075   Double_t &operator()(Int_t i1,Int_t i2,Int_t i3,Int_t i4,Int_t i5,Int_t i6);
00076   ClassDef(TEcnaNArrayD,1) //ROOT class for multidimensional arrays of Double_t
00077 };
00078 #endif