CbmRoot
Loading...
Searching...
No Matches
CbmBmon.cxx
Go to the documentation of this file.
1/* Copyright (C) 2023 Facility for AntiProton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Eoin Clerkin [committer] */
4
5#include "CbmBmon.h"
6
7#include "CbmGeoBmon.h"
8#include "CbmGeometryUtils.h"
9
10#include "FairDetector.h"
11#include "FairGeoInterface.h"
12#include "FairGeoLoader.h"
13#include "FairGeoNode.h"
14#include "FairModule.h"
15#include "FairRun.h"
16#include "FairRuntimeDb.h"
17
18#include "TFile.h"
19#include "TGeoManager.h"
20#include "TKey.h"
21#include "TList.h"
22#include "TObjArray.h"
23
24CbmBmon::CbmBmon() : FairModule(), fCombiTrans(), fVolumeName("") {}
25// CbmBmon::CbmBmon() : FairDetector(), fCombiTrans(), fVolumeName("") {}
26
27CbmBmon::CbmBmon(const char* name, const char* title) : FairModule(name, title), fCombiTrans(), fVolumeName("") {}
28
29// CbmBmon::CbmBmon(Bool_t active, const char* name)
30/* CbmBmon::CbmBmon(const char* name, const char* Title)
31 : FairDetector(name, fActive, ToIntegralType(ECbmModuleId::kBmon))
32 , fStatusIn()
33 , fStatusOut()
34 , fEloss(0.)
35 , fAddressMap()
36 , fSetup(NULL)
37 , fCombiTrans(NULL)
38 , fProcessNeutrals(kFALSE)
39{
40} */
41
43
45{
47 LOG(info) << "Importing BMON geometry from ROOT file " << fgeoName.Data();
49 }
50 else {
51 LOG(info) << "Constructing BMON geometry from ROOT file " << fgeoName.Data();
52 FairModule::ConstructGeometry();
53 // FairModule::ConstructRootGeometry();
54 // FairDetector::ConstructRootGeometry();
55 }
56}
57
58
60{
61 TString fileName = GetGeometryFileName();
62 if (fileName.EndsWith(".root")) {
63 // if (Cbm::GeometryUtils::IsNewGeometryFile(fgeoName)) {
64
65 std::cout << "\tfgeoName=" << fgeoName << "\n\tdata=" << fgeoName.Data() << std::endl;
66
67
68 std::cout << "\tfileName = " << fileName.Data() << std::endl;
69
70
71 LOG(info) << "Importing BMON geometry from ROOT file " << fgeoName.Data();
73 // }
74 }
75 else
76 LOG(fatal) << "Geometry format of BMON file " << fileName.Data() << " not supported.";
77}
78
ClassImp(CbmConverterManager)
virtual void ConstructGeometry()
Definition CbmBmon.cxx:59
virtual void ConstructRootGeometry(TGeoMatrix *shift=nullptr)
Definition CbmBmon.cxx:44
CbmBmon()
Definition CbmBmon.cxx:24
TGeoCombiTrans * fCombiTrans
Definition CbmBmon.h:39
virtual ~CbmBmon()
Definition CbmBmon.cxx:42
Bool_t IsNewGeometryFile(TString &filename)
void ImportRootGeometry(TString &filename, FairModule *mod, TGeoMatrix *mat)