Skip to content

Commit bd38b24

Browse files
authored
Merge pull request AliceO2Group#8993 from jmyrcha/dev3
o2-eve: version number in o2-eve window title
1 parent 91a6931 commit bd38b24

11 files changed

Lines changed: 17 additions & 15 deletions

File tree

EventVisualisation/Base/include/EventVisualisationBase/ConfigurationManager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ namespace o2
2323
{
2424
namespace event_visualisation
2525
{
26+
/// Version of the software
27+
const static std::string o2_eve_version = "1.20";
2628

2729
/// Configuration Manager allows an easy access to the config file.
2830
///

EventVisualisation/DataConverter/include/EventVisualisationDataConverter/VisualisationEvent.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class VisualisationEvent
150150

151151
const VisualisationCluster& getCluster(int i) const { return mClusters[i]; };
152152
size_t getClusterCount() const { return mClusters.size(); } // Returns number of clusters
153-
void setWorkflowVersion(float workflowVersion) { this->mWorkflowVersion = workflowVersion; }
153+
void setWorkflowVersion(const std::string& workflowVersion) { this->mWorkflowVersion = workflowVersion; }
154154
void setWorkflowParameters(const std::string& workflowParameters) { this->mWorkflowParameters = workflowParameters; }
155155

156156
std::string getCollisionTime() const { return this->mCollisionTime; }
@@ -185,7 +185,7 @@ class VisualisationEvent
185185

186186
float mMinTimeOfTracks; /// minimum time of tracks in the event
187187
float mMaxTimeOfTracks; /// maximum time of tracks in the event
188-
float mWorkflowVersion; /// workflow version used to generate this Event
188+
std::string mWorkflowVersion; /// workflow version used to generate this Event
189189
std::string mWorkflowParameters; /// workflow parameters used to generate this Event
190190
int mEventNumber; /// event number in file
191191
double mEnergy; /// energy of the collision

EventVisualisation/DataConverter/src/VisualisationEventJSONSerializer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ std::string VisualisationEventJSONSerializer::toJson(const VisualisationEvent& e
7373
tree.AddMember("firstTForbit", rapidjson::Value().SetInt(event.mFirstTForbit), allocator);
7474

7575
tree.AddMember("collisionTime", rapidjson::Value().SetString(event.mCollisionTime.c_str(), event.mCollisionTime.size()), allocator);
76-
tree.AddMember("workflowVersion", rapidjson::Value().SetFloat(event.mWorkflowVersion), allocator);
76+
tree.AddMember("workflowVersion", rapidjson::Value().SetString(event.mWorkflowVersion.c_str(), event.mWorkflowVersion.size()), allocator);
7777
tree.AddMember("workflowParameters", rapidjson::Value().SetString(event.mWorkflowParameters.c_str(), event.mWorkflowParameters.size()), allocator);
7878
// Tracks
7979
tree.AddMember("trackCount", rapidjson::Value().SetInt(event.getTrackCount()), allocator);
-5.16 KB
Binary file not shown.

EventVisualisation/View/src/Initializer.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "EventVisualisationView/Initializer.h"
2020

2121
#include "EventVisualisationBase/ConfigurationManager.h"
22-
#include "EventVisualisationBase/GeometryManager.h"
2322
#include "EventVisualisationView/EventManager.h"
2423
#include "EventVisualisationView/MultiView.h"
2524
#include "EventVisualisationDataConverter/VisualisationConstants.h"
@@ -75,6 +74,8 @@ void Initializer::setup()
7574

7675
// Setup windows size, fullscreen and focus
7776
TEveBrowser* browser = gEve->GetBrowser();
77+
std::string title = std::string("o2-eve v:") + o2_eve_version;
78+
browser->SetWindowName(title.c_str());
7879
browser->GetTabRight()->SetTab(1);
7980
browser->MoveResize(0, 0, gClient->GetDisplayWidth(), gClient->GetDisplayHeight() - 32);
8081

@@ -94,7 +95,6 @@ void Initializer::setup()
9495
// Temporary:
9596
// Later this will be triggered by button, and finally moved to configuration.
9697
gEve->AddEvent(&EventManager::getInstance());
97-
// eventManager.getDataSource()->refresh();
9898

9999
if (Options::Instance()->online()) {
100100
frame->StartTimer();

EventVisualisation/View/src/main.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ using namespace o2::event_visualisation;
3333

3434
int main(int argc, char** argv)
3535
{
36-
LOG(info) << "Welcome in O2 event visualisation tool (v1.02)";
36+
LOG(info) << "Welcome in O2 event visualisation tool (" << o2_eve_version << ")";
3737

3838
if (!Options::Instance()->processCommandLine(argc, argv)) {
3939
exit(-1);

EventVisualisation/Workflow/include/EveWorkflow/EveWorkflowHelper.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ class EveWorkflowHelper
176176
int numberOfFiles,
177177
o2::dataformats::GlobalTrackID::mask_t trkMask,
178178
o2::dataformats::GlobalTrackID::mask_t clMask,
179-
float workflowVersion,
180179
o2::header::DataHeader::RunNumberType runNumber,
181180
o2::framework::DataProcessingHeader::CreationTime creationTime);
182181

EventVisualisation/Workflow/include/EveWorkflow/O2DPLDisplay.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class TPCFastTransform;
4646
class O2DPLDisplaySpec : public o2::framework::Task
4747
{
4848
public:
49-
static constexpr float mWorkflowVersion = 1.02; // helps recognizing version of workflow which produce data
5049
O2DPLDisplaySpec(bool useMC, o2::dataformats::GlobalTrackID::mask_t trkMask,
5150
o2::dataformats::GlobalTrackID::mask_t clMask,
5251
std::shared_ptr<o2::globaltracking::DataRequest> dataRequest, const std::string& jsonPath,

EventVisualisation/Workflow/src/AO2DConverter.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void AO2DConverter::process(o2::aod::Collisions const& collisions, EveWorkflowHe
5454
mHelper->drawAODMFT(track, c.collisionTime());
5555
}
5656

57-
mHelper->save(jsonPath, collisions.size(), GlobalTrackID::MASK_ALL, GlobalTrackID::MASK_NONE, mWorkflowVersion, mRunNumber, mCreationTime);
57+
mHelper->save(jsonPath, collisions.size(), GlobalTrackID::MASK_ALL, GlobalTrackID::MASK_NONE, mRunNumber, mCreationTime);
5858
mHelper->clear();
5959
}
6060
}

EventVisualisation/Workflow/src/EveWorkflowHelper.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/// \author julian.myrcha@cern.ch
1414

1515
#include <EveWorkflow/EveWorkflowHelper.h>
16+
#include "EventVisualisationBase/ConfigurationManager.h"
1617
#include "EventVisualisationDataConverter/VisualisationEventSerializer.h"
1718
#include "ReconstructionDataFormats/GlobalTrackID.h"
1819
#include "EveWorkflow/FileProducer.h"
@@ -199,9 +200,9 @@ void EveWorkflowHelper::draw()
199200

200201
void EveWorkflowHelper::save(const std::string& jsonPath, int numberOfFiles,
201202
o2::dataformats::GlobalTrackID::mask_t trkMask, o2::dataformats::GlobalTrackID::mask_t clMask,
202-
float workflowVersion, o2::header::DataHeader::RunNumberType runNumber, o2::framework::DataProcessingHeader::CreationTime creation)
203+
o2::header::DataHeader::RunNumberType runNumber, o2::framework::DataProcessingHeader::CreationTime creation)
203204
{
204-
mEvent.setWorkflowVersion(workflowVersion);
205+
mEvent.setWorkflowVersion(o2_eve_version);
205206
mEvent.setRunNumber(runNumber);
206207
std::time_t timeStamp = std::time(nullptr);
207208
std::string asciiTimeStamp = std::asctime(std::localtime(&timeStamp));

0 commit comments

Comments
 (0)