Skip to content

Commit 73a8677

Browse files
jmyrchashahor02
authored andcommitted
adding functionality to read data from ITS detector (AliceO2Group#2686)
* adding functionality to read data from ITS detector
1 parent 471de28 commit 73a8677

16 files changed

Lines changed: 370 additions & 84 deletions

File tree

EventVisualisation/Base/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ o2_add_library(EventVisualisationBase
1212
SOURCES src/ConfigurationManager.cxx
1313
src/DataInterpreter.cxx
1414
src/DataSourceOffline.cxx
15-
src/EventRegistration.cxx
1615
src/GeometryManager.cxx
1716
PUBLIC_LINK_LIBRARIES ROOT::Eve
1817
O2::CCDB

EventVisualisation/Base/include/EventVisualisationBase/DataInterpreter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
///
1212
/// \file DataInterpreter.h
1313
/// \author Jeremi Niedziela
14+
/// \author julian.myrcha@cern.ch
15+
/// \author p.nowakowski@cern.ch
1416

1517
#ifndef ALICE_O2_EVENTVISUALISATION_BASE_DATAINTERPRETER_H
1618
#define ALICE_O2_EVENTVISUALISATION_BASE_DATAINTERPRETER_H

EventVisualisation/Base/include/EventVisualisationBase/DataSource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// or submit itself to any jurisdiction.
1010

1111
/// \file DataReaderITS.h
12-
/// \brief VSD specific reading from file(s) (Visualisation Summary Data)
12+
/// \brief reading from file(s)
1313
/// \author julian.myrcha@cern.ch
1414
/// \author p.nowakowski@cern.ch
1515

EventVisualisation/Base/include/EventVisualisationBase/EventRegistration.h

Lines changed: 0 additions & 44 deletions
This file was deleted.

EventVisualisation/Base/src/EventRegistration.cxx

Lines changed: 0 additions & 25 deletions
This file was deleted.

EventVisualisation/Detectors/CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,18 @@
99
# submit itself to any jurisdiction.
1010

1111
o2_add_library(EventVisualisationDetectors
12-
SOURCES src/DataInterpreterTPC.cxx
13-
src/DataReaderTPC.cxx
14-
PUBLIC_LINK_LIBRARIES
12+
SOURCES
13+
src/DataInterpreterTPC.cxx
14+
src/DataReaderTPC.cxx
15+
src/DataInterpreterITS.cxx
16+
src/DataReaderITS.cxx
17+
src/DataInterpreterVSD.cxx
18+
src/DataReaderVSD.cxx
19+
PUBLIC_LINK_LIBRARIES
1520
O2::EventVisualisationBase
1621
O2::DataFormatsTPC
22+
O2::DataFormatsITSMFT
23+
O2::DataFormatsITS
24+
O2::ITSBase
1725
O2::TPCBase
1826
)
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
/// \file DataInterpreterITS.h
12+
/// \brief converting ITS data to Event Visualisation primitives
13+
/// \author julian.myrcha@cern.ch
14+
/// \author p.nowakowski@cern.ch
15+
16+
#ifndef ALICE_O2_EVENTVISUALISATION_DETECTORS_DATAINTERPRETERITS_H
17+
#define ALICE_O2_EVENTVISUALISATION_DETECTORS_DATAINTERPRETERITS_H
18+
19+
///
20+
/// This class overrides DataInterpreter and implements method
21+
/// returning visualisation objects representing data from ITS file.
22+
23+
#include "EventVisualisationBase/DataInterpreter.h"
24+
#include "EventVisualisationBase/VisualisationConstants.h"
25+
26+
namespace o2
27+
{
28+
namespace event_visualisation
29+
{
30+
31+
class DataInterpreterITS : public DataInterpreter
32+
{
33+
public:
34+
// Default constructor
35+
DataInterpreterITS();
36+
37+
// Default destructor
38+
~DataInterpreterITS() final = default;
39+
40+
// Returns a visualisation Event for this data type
41+
std::unique_ptr<VisualisationEvent> interpretDataForType(TObject* data, EVisualisationDataType type) final;
42+
};
43+
44+
} // namespace event_visualisation
45+
} // namespace o2
46+
47+
#endif //ALICE_O2_EVENTVISUALISATION_BASE_DATAINTERPRETERITS_H

EventVisualisation/Detectors/include/EventVisualisationDetectors/DataInterpreterTPC.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class DataInterpreterTPC : public DataInterpreter
3838
// Default destructor
3939
~DataInterpreterTPC() final;
4040

41-
//
41+
// Returns a visualisation Event for this data type
4242
std::unique_ptr<VisualisationEvent> interpretDataForType(TObject* data, EVisualisationDataType type) final;
4343
};
4444

EventVisualisation/Detectors/include/EventVisualisationDetectors/DataInterpreterVSD.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class DataInterpreterVSD : public DataInterpreter
5757
// Default destructor
5858
~DataInterpreterVSD() final;
5959

60-
// Returns a list of random tracks colored by PID
60+
// Returns a visualisation Event for this data type
6161
std::unique_ptr<VisualisationEvent> interpretDataForType(TObject* data, EVisualisationDataType type) final;
6262
};
6363

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
/// \file DataReaderITS.h
12+
/// \brief ITS Detector-specific reading from file(s)
13+
/// \author julian.myrcha@cern.ch
14+
15+
#ifndef O2EVE_EVENTVISUALISATION_DETECTORS_DATAREADERITS_H
16+
#define O2EVE_EVENTVISUALISATION_DETECTORS_DATAREADERITS_H
17+
18+
#include <TFile.h>
19+
#include "EventVisualisationBase/DataReader.h"
20+
21+
namespace o2
22+
{
23+
namespace event_visualisation
24+
{
25+
26+
class DataReaderITS : public DataReader
27+
{
28+
private:
29+
Int_t mMaxEv;
30+
TFile* mClusFile;
31+
TFile* mTracFile;
32+
33+
public:
34+
DataReaderITS() = default;
35+
;
36+
void open() override;
37+
int GetEventCount() const override { return mMaxEv; }
38+
39+
TObject* getEventData(int no) override;
40+
};
41+
42+
} // namespace event_visualisation
43+
} // namespace o2
44+
45+
#endif //O2EVE_DATAREADERITS_H

0 commit comments

Comments
 (0)