Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:46:29

0001 #ifndef ROOT_TEcnaNArrayD
0002 #define ROOT_TEcnaNArrayD
0003 
0004 #include "TObject.h"
0005 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaObject.h"
0006 
0007 ///-----------------------------------------------------------
0008 ///   TEcnaNArrayD.h
0009 ///   Update: 05/10/2012
0010 ///   Authors:   FX Gentit, B.Fabbro (bernard.fabbro@cea.fr),
0011 ///              DSM/IRFU/SPP CEA-Saclay
0012 ///   Copyright: Those valid for CEA sofware
0013 ///
0014 ///   ECNA web page:
0015 ///     http://cms-fabbro.web.cern.ch/cms-fabbro/
0016 ///     cna_new/Correlated_Noise_Analysis/ECNA_main_page.htm
0017 ///-----------------------------------------------------------
0018 ///
0019 ///   ROOT class for multidimensional arrays of Double_t
0020 ///
0021 
0022 class TEcnaNArrayD : public TObject {
0023 protected:
0024   Int_t fNd;     //dimension of the array
0025   Int_t fN1;     //number of elements in the 1st dimension
0026   Int_t fN2;     //number of elements in the 2nd dimension
0027   Int_t fN3;     //number of elements in the 3rf dimension
0028   Int_t fN4;     //number of elements in the 4th dimension
0029   Int_t fN5;     //number of elements in the 5th dimension
0030   Int_t fN6;     //number of elements in the 6th dimension
0031   Int_t fNL;     //length of the array = fN1*fN2*fN3*fN4*fN5*fN6 + 1
0032   Double_t *fA;  //[fNL] Array of Double_t of dimension fNd
0033 
0034   void Init();
0035   inline Int_t OneDim(Int_t) const;
0036   inline Int_t OneDim(Int_t, Int_t) const;
0037   inline Int_t OneDim(Int_t, Int_t, Int_t) const;
0038   inline Int_t OneDim(Int_t, Int_t, Int_t, Int_t) const;
0039   inline Int_t OneDim(Int_t, Int_t, Int_t, Int_t, Int_t) const;
0040   inline Int_t OneDim(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t) const;
0041 
0042 public:
0043   TEcnaNArrayD();
0044   TEcnaNArrayD(const TEcnaNArrayD &);
0045 
0046   TEcnaNArrayD(TEcnaObject *, Int_t);
0047   TEcnaNArrayD(TEcnaObject *, Int_t, Int_t);
0048   TEcnaNArrayD(TEcnaObject *, Int_t, Int_t, Int_t);
0049   TEcnaNArrayD(TEcnaObject *, Int_t, Int_t, Int_t, Int_t);
0050   TEcnaNArrayD(TEcnaObject *, Int_t, Int_t, Int_t, Int_t, Int_t);
0051   TEcnaNArrayD(TEcnaObject *, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t);
0052   ~TEcnaNArrayD() override;
0053   void Clean();
0054   Double_t GetOverFlow() const { return fA[fNL - 1]; }
0055   void ReSet(Int_t);
0056   void ReSet(Int_t, Int_t);
0057   void ReSet(Int_t, Int_t, Int_t);
0058   void ReSet(Int_t, Int_t, Int_t, Int_t);
0059   void ReSet(Int_t, Int_t, Int_t, Int_t, Int_t);
0060   void ReSet(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t);
0061   const Double_t &operator()(Int_t i1) const;
0062   const Double_t &operator()(Int_t i1, Int_t i2) const;
0063   const Double_t &operator()(Int_t i1, Int_t i2, Int_t i3) const;
0064   const Double_t &operator()(Int_t i1, Int_t i2, Int_t i3, Int_t i4) const;
0065   const Double_t &operator()(Int_t i1, Int_t i2, Int_t i3, Int_t i4, Int_t i5) const;
0066   const Double_t &operator()(Int_t i1, Int_t i2, Int_t i3, Int_t i4, Int_t i5, Int_t i6) const;
0067   Double_t &operator()(Int_t i1);
0068   Double_t &operator()(Int_t i1, Int_t i2);
0069   Double_t &operator()(Int_t i1, Int_t i2, Int_t i3);
0070   Double_t &operator()(Int_t i1, Int_t i2, Int_t i3, Int_t i4);
0071   Double_t &operator()(Int_t i1, Int_t i2, Int_t i3, Int_t i4, Int_t i5);
0072   Double_t &operator()(Int_t i1, Int_t i2, Int_t i3, Int_t i4, Int_t i5, Int_t i6);
0073   ClassDefOverride(TEcnaNArrayD, 1)  //ROOT class for multidimensional arrays of Double_t
0074 };
0075 #endif