Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computing
cbmroot
Commits
3f99b87e
Commit
3f99b87e
authored
1 year ago
by
Administrator
Committed by
Florian Uhlig
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove usage of sprintf
Use snprintf instead.
parent
64992f2f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1155
Fix compilation warnings
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reco/detectors/mvd/plugins/tasks/CbmMvdSensorClusterfinderTask.cxx
+11
-6
11 additions, 6 deletions
...ctors/mvd/plugins/tasks/CbmMvdSensorClusterfinderTask.cxx
with
11 additions
and
6 deletions
reco/detectors/mvd/plugins/tasks/CbmMvdSensorClusterfinderTask.cxx
+
11
−
6
View file @
3f99b87e
...
@@ -125,25 +125,30 @@ void CbmMvdSensorClusterfinderTask::InitTask(CbmMvdSensor* mysensor)
...
@@ -125,25 +125,30 @@ void CbmMvdSensorClusterfinderTask::InitTask(CbmMvdSensor* mysensor)
fFullClusterHisto
=
new
TH1F
(
"ChargeOfAllPixels"
,
"ChargeOfAllPixels"
,
12000
,
0
,
12000
);
fFullClusterHisto
=
new
TH1F
(
"ChargeOfAllPixels"
,
"ChargeOfAllPixels"
,
12000
,
0
,
12000
);
//}
//}
TH1F
*
histo
;
TH1F
*
histoTotalCharge
;
char
*
histoName
=
new
char
[
20
];
char
*
histoTotalChargeName
=
new
char
[
50
];
//Add charge collection histograms
//Add charge collection histograms
fPixelChargeHistos
=
new
TObjArray
();
fPixelChargeHistos
=
new
TObjArray
();
size_t
buf_size
=
20
;
char
*
histoName
=
new
char
[
buf_size
];
TH1F
*
histo
;
for
(
Int_t
i
=
0
;
i
<
49
;
i
++
)
{
for
(
Int_t
i
=
0
;
i
<
49
;
i
++
)
{
sprintf
(
histoName
,
"ChargePixel%i"
,
i
+
1
);
s
n
printf
(
histoName
,
buf_size
-
1
,
"ChargePixel%i"
,
i
+
1
);
histo
=
new
TH1F
(
histoName
,
histoName
,
200
,
0
,
200
);
histo
=
new
TH1F
(
histoName
,
histoName
,
200
,
0
,
200
);
fPixelChargeHistos
->
AddLast
(
histo
);
fPixelChargeHistos
->
AddLast
(
histo
);
};
};
delete
[]
histoName
;
fTotalChargeInNpixelsArray
=
new
TObjArray
();
fTotalChargeInNpixelsArray
=
new
TObjArray
();
buf_size
=
50
;
char
*
histoTotalChargeName
=
new
char
[
buf_size
];
TH1F
*
histoTotalCharge
;
for
(
Int_t
i
=
0
;
i
<
49
;
i
++
)
{
for
(
Int_t
i
=
0
;
i
<
49
;
i
++
)
{
sprintf
(
histoTotalChargeName
,
"totalChargeInNPixels%i"
,
i
+
1
);
s
n
printf
(
histoTotalChargeName
,
buf_size
-
1
,
"totalChargeInNPixels%i"
,
i
+
1
);
histoTotalCharge
=
new
TH1F
(
histoTotalChargeName
,
histoTotalChargeName
,
12000
,
0
,
12000
);
histoTotalCharge
=
new
TH1F
(
histoTotalChargeName
,
histoTotalChargeName
,
12000
,
0
,
12000
);
fTotalChargeInNpixelsArray
->
AddLast
(
histoTotalCharge
);
fTotalChargeInNpixelsArray
->
AddLast
(
histoTotalCharge
);
};
};
delete
[]
histoTotalChargeName
;
//Number 49
//Number 49
histo
=
new
TH1F
(
"ChargePixelSeed"
,
"ChargePixelSeed"
,
200
,
0
,
14000
);
histo
=
new
TH1F
(
"ChargePixelSeed"
,
"ChargePixelSeed"
,
200
,
0
,
14000
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment