PandaRoot
PndMvdBoxMap.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // Class PndMvdBoxApv
14 // To be used when analyzing .root DAQ files
15 
16 // Simone Bianco
17 
18 #ifndef PNDMVDMAPBOX_H
19 #define PNDMVDMAPBOX_H
20 
21 #include <iostream>
22 #include <utility>
23 #include <string>
24 #include <vector>
25 #include <map>
26 #include "TString.h"
27 #include "TObject.h" // contains message printing methods
28 
29 class PndMvdBoxMap : public TObject {
30  public:
31  // Constructor/destructor
32  PndMvdBoxMap() : box(), fCh(), lCh(), fMap(), fFileName(""), nLines(0){};
33  PndMvdBoxMap(TString nome) : box(), fCh(), lCh(), fMap(), fFileName(""), nLines(0) { SetMappingFile(nome); };
34 
36 
37  // Printing
38  void Print();
39 
40  // Initialization & setup
41  void SetMappingFile(TString nome) { fFileName = nome; };
42  Bool_t Init();
43 
44  // Retrieveing information
45  void DoMapping(Int_t nbox, Int_t chan, TString &detpath);
46 
47  void PrintMap();
48 
49  // Members
50  private:
51  // the lookup table: ( RW Id | SW Id | Detname )
52 
53  /* Int_t *box;
54  Int_t *fCh;
55  Int_t *lCh;*/
56  // TClonesArray *nameArr;
57  // std::vector <TString> name;
58 
59  std::map<Int_t, Int_t> box;
60  std::map<Int_t, Int_t> fCh;
61  std::map<Int_t, Int_t> lCh;
62 
63  std::map<Int_t, TString> fMap;
64 
65  TString fFileName;
66  Int_t nLines;
67 
68  ClassDef(PndMvdBoxMap, 1);
69 };
70 
71 #endif
void PrintMap()
PndMvdBoxMap(TString nome)
Definition: PndMvdBoxMap.h:33
void DoMapping(Int_t nbox, Int_t chan, TString &detpath)
Bool_t Init()
void SetMappingFile(TString nome)
Definition: PndMvdBoxMap.h:41